<style scoped>
</style>
<!--  -->
<template>
  <div class="operate-system-list dffr">
    <el-button
      type="primary"
      @click="create"
    >创建系统</el-button>
    <el-button
      type="success"
      @click="reset"
    >刷新</el-button>
    <el-button
      type="warning"
      @click="copy"
    >复制系统</el-button>
    <SaveSystem
      ref="createSystem"
      :resetData="resetData"
      :tableData="tableData"
    />
    <CopySystem
      ref="copySystem"
      :resetData="resetData"
    />
  </div>
</template>

<script>
import SaveSystem from '@/components/main/user/system/common/SaveSystem.vue'
import CopySystem from '@/components/main/user/system/common/CopySystem.vue'
export default {
  props: {
    resetData: {
      type: Function
    },
    getData: {
      type: Function
    }
  },
  data () {
    return {
      tableData: []
    }
  },
  methods: {
    create () {
      this.tableData = this.getData()
      this.$refs['createSystem'].show('创建系统')
    },
    reset () {
      this.resetData()
    },
    copy () {
      this.$refs['copySystem'].show('复制系统')
    }
  },
  components: {
    SaveSystem,
    CopySystem
  }
}

</script>
